<#include "/common/layout.ftl"/>
<@layout "博客分类">
    <#include "/common/panel.ftl"/>

    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <div class="fly-panel" style="margin-bottom: 0;">
                    <div class="fly-panel-title fly-filter">
                        <a href="?typeId=0" class="${(typeId == 0) ? string('layui-this', '')}">综合</a>
                        <span class="fly-mid"></span>
                        <a href="?level=1&typeId=1" class="${(typeId == 1) ? string('layui-this', '')}">精华</a>
                        <span class="fly-filter-right layui-hide-xs">
                        <a href="?order=create_time&orderId=0" class="${(orderId == 0) ? string('layui-this', '')}">按最新</a>
                        <span class="fly-mid"></span>
                        <a href="?order=view_count&orderId=1" class="${(orderId == 1) ? string('layui-this', '')}">按热议</a>
                      </span>
                    </div>
                    <@posts categoryId=currentCategoryId pn=currentPn size=10>
                        <ul class="fly-list">
                            <#list results.records as post>
                                <@postItem post></@postItem>
                            </#list>
                        </ul>
                        <#--分页-->
                        <#if results.total gt 0>
                            <@paging results></@paging>
                        </#if>
                        <#if results.total == 0>
                            <div class="fly-none">没有相关数据</div>
                        </#if>
                    </@posts>
                </div>
            </div>
            <#include "/common/right.ftl"/>
        </div>
    </div>
</@layout>